﻿<Page
    x:Class="RichMan4LApp.PlayerConfigPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:RichMan4LApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Loaded="Page_Loaded">
	<Page.Resources>
		<Thickness x:Key="FlyoutContentPanelPortraitThemeMargin">0,25.5,0,0</Thickness>
		<Thickness x:Key="FlyoutContentPanelLandscapeThemeMargin">0,0,0,0</Thickness>
		<x:String x:Key="Player1String">玩家1</x:String>
		<x:String x:Key="CharacterString">人物</x:String>
		<x:String x:Key="ControllerString">控制者</x:String>
		<Flyout x:Key="Player1Flyout" FlyoutPresenterStyle="{StaticResource FlyoutPresenterStyle}">
			<Grid Background="{StaticResource DarkLime}" Height="324">
				<Grid.RowDefinitions>
					<RowDefinition Height="20"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="20"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="20"/>
					<RowDefinition/>
					<RowDefinition Height="20"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="20"/>
					<ColumnDefinition Width="1*"/>
					<ColumnDefinition Width="20"/>
					<ColumnDefinition Width="1*"/>
					<ColumnDefinition Width="20"/>
				</Grid.ColumnDefinitions>
				<TextBlock TextWrapping="Wrap" Text="{StaticResource Player1String}" Grid.Column="1" Grid.Row="1" FontFamily="{StaticResource Font}" FontSize="32" d:LayoutOverrides="Width, Height, LeftPosition, RightPosition, TopPosition, BottomPosition"/>
				<TextBlock TextWrapping="Wrap" Text="{StaticResource CharacterString}" Grid.Column="1" Grid.Row="3" FontFamily="{StaticResource Font}" FontSize="21.333" d:LayoutOverrides="Height, LeftPosition, RightPosition, TopPosition, BottomPosition" Margin="0,0,0,-0.333"/>
				<TextBlock TextWrapping="Wrap" Text="{StaticResource ControllerString}" Grid.Column="3" Grid.Row="3" FontFamily="{StaticResource Font}" FontSize="21.333" d:LayoutOverrides="Width, Height, LeftPosition, RightPosition, TopPosition, BottomPosition" Margin="0,0,0,-0.333"/>
				<FlipView x:Name="flipView" Grid.Column="1" Grid.Row="5" d:LayoutOverrides="Height, LeftPosition, RightPosition"/>
			</Grid>
		</Flyout>
		<x:String x:Key="Player2String">玩家2</x:String>
		<x:String x:Key="Player3String">玩家3</x:String>
		<x:String x:Key="Player4String">玩家4</x:String>
		<Storyboard x:Name="StartStoryBoard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="640" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PlayerConfigPageUpImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PlayerConfigPageDownImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="LeaveStoryBoard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PlayerConfigPageUpImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PlayerConfigPageDownImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="600" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>

	<Grid>
		<Rectangle x:Name="BackGroundRect" Fill="{StaticResource Lime}" d:LayoutOverrides="LeftMargin, RightMargin, TopMargin, BottomMargin, TopPosition, BottomPosition"/>
		<Image x:Name="PlayerConfigPageUpImage" Margin="0" Source="ms-appx:///PageResources/PlayerConfigPageUp.png" Stretch="UniformToFill" d:LayoutOverrides="TopPosition, BottomPosition" VerticalAlignment="Top"/>
		<Image x:Name="PlayerConfigPageDownImage" Margin="0" Source="ms-appx:///PageResources/PlayerConfigPageDown.png" Stretch="UniformToFill" d:LayoutOverrides="TopPosition, BottomPosition" VerticalAlignment="Bottom"/>
		<Grid x:Name="MainGrid" Margin="0" RenderTransformOrigin="0.5,0.5">
			<Grid.RenderTransform>
				<CompositeTransform/>
			</Grid.RenderTransform>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="40"/>
				<ColumnDefinition Width="1*"/>
				<ColumnDefinition Width="10"/>
				<ColumnDefinition Width="1*"/>
				<ColumnDefinition Width="10"/>
				<ColumnDefinition Width="1*"/>
				<ColumnDefinition Width="40"/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="40"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="40"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="30"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="30"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="30"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="30"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="30"/>
				<RowDefinition/>
				<RowDefinition Height="30"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="40"/>
			</Grid.RowDefinitions>
			<TextBlock x:Name="Title" TextWrapping="Wrap" Text="人物设定" FontFamily="{StaticResource Font}" FontSize="{StaticResource PageTitleFontSize}" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="5"/>
			<TextBlock TextWrapping="Wrap" Grid.Column="1" Grid.Row="3" FontSize="21.333" FontFamily="{StaticResource Font}" Text="玩家们" Margin="0,-0.167"/>
			<TextBlock TextWrapping="Wrap" Grid.Column="3" Grid.Row="3" FontSize="21.333" FontFamily="{StaticResource Font}" Text="{StaticResource CharacterString}" Margin="0,-0.167"/>
			<TextBlock TextWrapping="Wrap" Grid.Column="5" Grid.Row="3" FontSize="21.333" FontFamily="{StaticResource Font}" Text="{StaticResource ControllerString}" Margin="0,-0.167"/>
			<TextBlock x:Name="Player1Text" TextWrapping="Wrap" Grid.Column="1" Grid.Row="5" FontSize="24" FontFamily="{StaticResource Font}" Text="{StaticResource Player1String}"/>
			<Button x:Name="Player1CharacterButton" Content="TextBlock" Grid.Column="3" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="5" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch"  d:LayoutOverrides="Height, TopPosition, BottomPosition" Flyout="{StaticResource Player1Flyout}" />
			<Button x:Name="Player1ControllerButton" Content="TextBlock" Grid.Column="5" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="5" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch" d:LayoutOverrides="Height, TopPosition, BottomPosition" />
			<TextBlock x:Name="Player2Text" TextWrapping="Wrap" Grid.Column="1" Grid.Row="7" FontFamily="{StaticResource Font}" FontSize="24" d:LayoutOverrides="Height, TopPosition, BottomPosition" Text="{StaticResource Player2String}"/>
			<Button x:Name="Player2CharacterButton" Content="TextBlock" Grid.Column="3" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="7" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch"  d:LayoutOverrides="Height, TopPosition, BottomPosition" />
			<Button x:Name="Player2ControllerButton" Content="TextBlock" Grid.Column="5" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="7" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch" d:LayoutOverrides="Height, TopPosition, BottomPosition" />
			<TextBlock x:Name="Player3Text" TextWrapping="Wrap" Grid.Column="1" Grid.Row="9" d:LayoutOverrides="Height, LeftPosition, RightPosition, TopPosition, BottomPosition" FontFamily="{StaticResource Font}" FontSize="24" Text="{StaticResource Player3String}"/>
			<Button x:Name="Player3CharacterButton" Content="TextBlock" Grid.Column="3" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="9" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch" d:LayoutOverrides="Height, TopPosition, BottomPosition" />
			<Button x:Name="Player3ControllerButton" Content="TextBlock" Grid.Column="5" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="9" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch"  d:LayoutOverrides="Height, TopPosition, BottomPosition" />
			<TextBlock x:Name="Player4Text" TextWrapping="Wrap" Grid.Column="1" Grid.Row="11" FontFamily="{StaticResource Font}" FontSize="24" d:LayoutOverrides="Height, LeftPosition, RightPosition, TopPosition, BottomPosition" Text="{StaticResource Player4String}"/>
			<Button x:Name="Player4CharacterButton" Content="TextBlock" Grid.Column="3" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="11" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch" d:LayoutOverrides="Height, TopPosition, BottomPosition" />
			<Button x:Name="Player4ControllerButton" Content="TextBlock" Grid.Column="5" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="11" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch" d:LayoutOverrides="Height, TopPosition, BottomPosition" />
			<Button x:Name="CreateGamePageButton" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,-8,-0.333" Grid.Row="15" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" FontFamily="{StaticResource Font}" d:LayoutOverrides="TopPosition, BottomPosition" FontSize="21.333" Grid.ColumnSpan="2" Click="CreateGamePageButton_Click">
				<Grid>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="5"/>
						<ColumnDefinition Width="Auto"/>
					</Grid.ColumnDefinitions>
					<TextBlock Margin="0" TextWrapping="Wrap" Text="创建游戏" d:LayoutOverrides="Width, Height" FontFamily="{StaticResource Font}" Grid.Column="2"/>
					<TextBlock Margin="0" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" FontFamily="ms-appx:/Fonts/FontAwesome.otf#FontAwesome" Text="&#xF060;" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Light"/>
					<Rectangle Grid.ColumnSpan="3">
						<Rectangle.Fill>
							<SolidColorBrush Color="{StaticResource Transparent}"/>
						</Rectangle.Fill>
					</Rectangle>
				</Grid>
			</Button>
			<Button x:Name="StartGameButton" Grid.Column="3" HorizontalAlignment="Right" Margin="0" Grid.Row="15" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" d:LayoutOverrides="TopPosition, BottomPosition" FontFamily="Segoe UI Symbol" FontSize="21.333" Grid.ColumnSpan="3" Click="StartGameButton_Click">
				<Grid Margin="0">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="5"/>
						<ColumnDefinition Width="Auto"/>
					</Grid.ColumnDefinitions>
					<TextBlock Margin="0" TextWrapping="Wrap" Text="开始游戏" d:LayoutOverrides="Width, Height" FontFamily="{StaticResource Font}"/>
					<TextBlock Margin="0" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" FontFamily="ms-appx:/Fonts/FontAwesome.otf#FontAwesome" Text="&#xF061;" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Light"/>
					<Rectangle Grid.ColumnSpan="2">
						<Rectangle.Fill>
							<SolidColorBrush Color="{StaticResource Transparent}"/>
						</Rectangle.Fill>
					</Rectangle>
				</Grid>
			</Button>

		</Grid>

	</Grid>
</Page>
